package StudyCode.summary.mycollection;

import java.util.*;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class KeySetKeyWithValueNullMap {
	static Map<String, String> getNullEntryMap(final Iterable<String> keySet) {
		return getNullEntryMap(Collections.singletonList(keySet));
	}


	static Map<String, String> getNullEntryMap(
			final Iterable<String> keySet1, final Iterable<String> keySet2) {
		final List<Iterable<String>> keySets = new ArrayList<Iterable<String>>(
				2);
		keySets.add(keySet1);
		keySets.add(keySet2);
		return getNullEntryMap(keySets);
	}


	private static Map<String, String> getNullEntryMap(
			final List<Iterable<String>> keySets) {
		final Map<String, String> entryMap = new LinkedHashMap<String, String>();
		for (final Iterable<String> keySet : keySets) {
			for (final String key : keySet) {
				entryMap.put(key, null);
			}
		}
		return entryMap;
	}
}
